import request from '@/utils/request'

// 获取单位
export function findAllUnitDeptList(query) {
  return request({
    url: '/cms/dept/findAllUnitDeptList',
    method: 'get',
    params: query
  })
}

// 获取单位
export function findAllDeptList(query) {
  return request({
    url: '/cms/dept/getList',
    method: 'get',
    params: query
  })
}

export function findManageUnitDeptList(query) {
  return request({
    url: '/cms/dept/findManageUnitDeptList',
    method: 'get',
    params: query
  })
}
// 获取固组单位
export function findBelongDept(query) {
  return request({
    url: '/cms/dept/findAllUnitDeptList',
    method: 'get',
    params: query
  })
}
// 获取缺陷等级
export function defectLevelList() {
  return request({
    url: '/cms/defectLevel/getList',
    method: 'get'
  })
}

// 获取缺陷类型
export function defectCategoryList(query) {
  return request({
    url: '/cms/defectCategory/getList',
    method: 'get',
    params: query
  })
}

export function defectCategoryPage(query) {
  return request({
    url: '/cms/defectCategory/pageList',
    method: 'get',
    params: query
  })
}

export function CType() {
  return request({
    url: '/cms/'
  })
}

// 获取铁路类型
export function railtypeList() {
  return request({
    url: '/cms/commons/railTypeList',
    method: 'get'
  })
}

// 获取线路数据
export function getLineList(query) {
  return request({
    url: '/cms/secline/getList',
    method: 'get',
    params: query
  })
}

export function getRailtypeList() {
  return request({
    url: '/cms/dict/railTypeList',
    method: 'get'
  })
}

export function getDirection() {
  return request({
    url: '/cms/direction/getList',
    method: 'get'
  })
}

// 获取缺陷源
export function getDefectOriginList(query) {
  return request({
    url: '/cms/defectOrigin/list',
    method: 'get',
    params: query
  })
}
export function findManageDeptTree(query) {
  return request({
    url: '/cms/dept/findManageDeptTree',
    method: 'get',
    params: query
  })
}

export function getSeclineTree(query) {
  return request({
    url: '/cms/secline/getSeclineTreeByAuth',
    method: 'get',
    params: query
  })
}

export function getDirectionList(query) {
  return request({
    url: '/cms/direction/getList',
    method: 'get',
    data: query
  })
}

// 获取区间站场
export function getSiteByLines(query) {
  return request({
    url: '/cms/lineSite/getList',
    method: 'get',
    params: query
  })
}

// 获取股道
export function getTrackList(query) {
  return request({
    url: '/cms/track/getList',
    method: 'get',
    params: query
  })
}
// 获取隧道
export function getTunnelList(query) {
  return request({
    url: '/cms/tunnel/getList',
    method: 'get',
    params: query
  })
}

export function getPillarListPage(query) {
  return request({
    url: '/cms/commons/pillar/listPage',
    method: 'get',
    params: query
  })
}

export function getPillarListPageRelation(query) {
  return request({
    url: '/cms/pillar/pageList',
    method: 'get',
    params: query
  })
}